/*
 * @Description: 设备看板接口
 * @Author: Liu Zhiwang
 * @Date: 2021-09-24 15:58:49
 * @LastEditTime: 2021-09-27 15:01:04
 * @LastEditors: Liu Zhiwang
 */
import request from '@/utils/request'

// 查询一杆一档概览数据
export function getBoardOutline(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/getBoardOutline') : '/jcwBasicgz/jcwRepairJob/getBoardOutline',
    method: 'GET',
    params: params
  })
}

// 查询各个tabs数据的数量
export function getDefectAndRepairJobCount(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/getDefectAndRepairJobCount') : '/jcwBasicgz/jcwRepairJob/getDefectAndRepairJobCount',
    method: 'GET',
    params: params
  })
}

// 查询设备及零部件
export function getPillarBoardParts(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/getPillarBoardParts/assemblyAndDeviceInfo') : '/jcwBasicgz/jcwRepairJob/getPillarBoardParts/assemblyAndDeviceInfo',
    method: 'GET',
    params: params
  })
}

// 查询设备及零部件分页
export function getPillarBoardPartsOfpage(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/getPillarBoardParts/pageData') : '/jcwBasicgz/jcwRepairJob/getPillarBoardParts/pageData',
    method: 'GET',
    params: params
  })
}

// 查询缺陷信息列表数据
export function getBoardDefectInfoList(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/getBoardDefectInfoList') : '/jcwBasicgz/jcwRepairJob/getBoardDefectInfoList',
    method: 'GET',
    params: params
  })
}

// 查询缺陷信息条件参数
export function getBoardDefectQueryInfo(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/getBoardDefectQueryInfo') : '/jcwBasicgz/jcwRepairJob/getBoardDefectQueryInfo',
    method: 'GET',
    params: params
  })
}

// 查询缺陷信息详情
export function getBoardDefectDetailInfo(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/getBoardDefectDetailInfo') : '/jcwBasicgz/jcwRepairJob/getBoardDefectDetailInfo',
    method: 'GET',
    params: params
  })
}

// 查询缺陷信息数量
export function getBoardDefectInfoListCount(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/getBoardDefectInfoListCount') : '/jcwBasicgz/jcwRepairJob/getBoardDefectInfoListCount',
    method: 'GET',
    params: params
  })
}

// 查询维修作业
export function getRepairJobList(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/getRepairJobList') : '/jcwBasicgz/jcwRepairJob/getRepairJobList',
    method: 'GET',
    params: params
  })
}

// 查询批复计划数据
export function getRepairDayPlan(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/dayPlan/getByPlanCode') : '/jcwBasicgz/jcwRepairJob/dayPlan/getByPlanCode',
    method: 'GET',
    params: params
  })
}

// 查询工作票数据
export function getRepairWorkticket(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/workticket/getByPlanCode') : '/jcwBasicgz/jcwRepairJob/workticket/getByPlanCode',
    method: 'GET',
    params: params
  })
}

// 查询分工单数据
export function getRepairDevideList(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/devideList/getByPlanCode') : '/jcwBasicgz/jcwRepairJob/devideList/getByPlanCode',
    method: 'GET',
    params: params
  })
}

// 查询作业信息数据
export function getRepairDetail(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/repairDetail/getByPlanCode') : '/jcwBasicgz/jcwRepairJob/repairDetail/getByPlanCode',
    method: 'GET',
    params: params
  })
}

// 查询支柱、设备维修台账列表
export function getRepairRecordTypeList(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/getRepairRecordTypeList') : '/jcwBasicgz/jcwRepairJob/getRepairRecordTypeList',
    method: 'GET',
    params: params
  })
}

// 查询维修台账详情
export function getRepairRecordList(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/getRepairRecordList') : '/jcwBasicgz/jcwRepairJob/getRepairRecordList',
    method: 'GET',
    params: params
  })
}

// 查询图纸资料
export function getBoardMaterial(query) {
  var params = JSON.parse(JSON.stringify(query))
  delete params.unitCodeParams
  return request({
    url: query.unitCodeParams ? ('/jcwBasic' + query.unitCodeParams + '/jcwRepairJob/getBoardMaterial') : '/jcwBasicgz/jcwRepairJob/getBoardMaterial',
    method: 'GET',
    params: params
  })
}
